import requests
from bs4 import BeautifulSoup
import re
from selenium import webdriver
import time

path = "src/video"


def getHTMLText(url):
    driver = webdriver.PhantomJS(executable_path='D:\\dev\\phantomjs-2.1.1-windows\\bin\\phantomjs')  # phantomjs的绝对路径
    time.sleep(2)
    driver.get(url)  # 获取网页
    time.sleep(2)

    return driver.page_source


def fillUnivlist(html):
    soup = BeautifulSoup(html, 'html.parser')  # 用HTML解析网址
    tag = soup.find_all('div')
    print(tag)
    return 0


def main():
    url = 'https://www.sex.com/pin/56736447-we-love-to-do-everything-anal-deep-throat-fucking-pussy/'  # 要访问的网址
    html = getHTMLText(url)  # 获取HTML
    fillUnivlist(html)


if __name__ == '__main__':
    main()